Encoding device, decoding device, encoding method, decoding method, and storage medium storing programs thereof

ABSTRACT

An encoding device includes a binary image generation unit that generates at least two binary images from a multivalued image by applying different methods, a check image generation unit that generates a check image based on the plural binary images generated by the binary image generation unit, and a code generation unit that generates coded data by encoding at least one of the binary images generated by the binary image generation unit and the check image generated by the check image generation unit by using different methods.

BACKGROUND

1. Technical Field

The present invention relates to an encoding device and a decodingdevice which detect falsification of a document.

2. Related Art

A document is required to be in a form which can be easily handled by auser so that it is suitably compressed while holding viewability to theextent that the contents of the document can be checked. On the otherhand, falsification of a document including company information andprivate information is required to be prevented. For this reason,considerable attention is paid to coping with both viewability andfalsification prevention.

Japanese Published Unexamined Patent Application No. 2001-094804discloses a method of removing any unnecessary image portion such asbackground color or offset from a color input image while preventing theimage from being deteriorated.

Japanese Published Unexamined Patent Application No. 2002-354253discloses a method of removing a background without leaving any isolatepoint when the background is in a halftone dot range.

In any of these methods, however, falsification detection has not beenconsidered.

Japanese Published Unexamined Patent Application No. Hei 11-338780discloses a method of authenticating an electronic document provided bya user using an encryption function to make a document finger print.

However, a background portion necessary for falsification detectionencoded at high compressibility disappears easily.

SUMMARY

The present invention has been made from the foregoing background andprovides an encoding device and a decoding device which effectivelyencode and decode a document to the extent that falsification can bedetected.

According to an aspect of the present invention, an encoding deviceincludes a binary image generation unit that generates at least twobinary images from a multivalued image by applying different methods, acheck image generation unit that generates a check image based on theplural binary images generated by the binary image generation unit, anda code generation unit that generates coded data by encoding at leastone of the binary images generated by the binary image generation unitand the check image generated by the check image generation unit-byusing different methods.

BRIEF DESCRIPTION OF THE DRAWINGS.

Embodiments of the present invention will be described in detail basedon the following figures, wherein:

FIG. 1 is a diagram illustrating a hardware configuration of an encodingdevice 2 and a decoding device 3 to which an encoding method and adecoding method according to the present invention are applied, focusingon a controller 20;

FIG. 2 is a diagram showing the functional structure of an encodingprogram 4 executed by the controller 20 to realize the encoding methodaccording to the present invention;

FIGS. 3A, 3B, 3C, and 3D are diagrams of assistance in explainingfloating binarization processing performed by a binary image generationpart 42 according to a first embodiment of the present invention, inwhich FIG. 3A illustrates the relation between input pixel values andfloating threshold values, FIG. 3B illustrates a browsing binary imagegenerated by a browsing image generation part 420, FIG. 3C illustrates adetecting binary image generated by a detecting image generation part422, and FIG. 3D illustrates a check image generated by a logicoperation part 44;

FIGS. 4A, 4B, and 4C are diagrams illustrating text area encodingperformed by a browsing image encoding part 460, in which FIG. 4Aillustrates a browsing binary image inputted to the browsing imageencoding part 460, FIG. 4B illustrates an image dictionary created bythe browsing image encoding part 460, and FIG. 4C illustrates data aftertext area encoding;

FIG. 5 is a flowchart showing encoding processing (S10) of the encodingprogram 4;.

FIG. 6 is a diagram showing the functional structure of a decodingprogram 5 executed by the controller 20 to realize the decoding methodaccording to the present invention;

FIGS. 7A, 7B, and 7C are diagrams of assistance in explaining refinementdecoding, in which FIG. 7A shows decoding of an area with anintermediate attribute, FIG. 7B shows the relation between an area of anauxiliary buffer and refinement decoding, and FIG. 7C shows the relationbetween a page buffer and refinement decoding;

FIG. 8 is a flowchart showing decoding processing (S20) of the decodingprogram 5; and

FIG. 9 is a diagram of assistance in explaining detecting binary imagegenerating processing performed by the detecting image generation part422 of the encoding program 4 according to a second embodiment of thepresent invention.

DETAILED DESCRIPTION

An encoding device 2 and a decoding device 3 according to a firstembodiment of the present invention will be described.

FIG. 1 is a diagram illustrating a hardware configuration of theencoding device 2 and the decoding device 3 to which an encoding methodand a decoding method according to the present invention are applied.

As illustrated in FIG. 1, the encoding device 2 or decoding device 3 hasa controller 20 including a CPU 202 and a memory 204, a communicationdevice 22, a storage device 24 such as an HDD and CD device, and a userinterface device (UI device) 26 including an LCD display or a CRTdisplay and a keyboard touch panel.

The encoding device 2 and the decoding device 3 are general-purposecomputers on which an encoding program 4 and a decoding program 5described later are installed as a part of a printer driver. Theencoding device 2 performs predetermined encoding processing tomultivalued image data inputted via the communication device 22 or thestorage device 24 to generate coded data which can detect falsification.The decoding device 3 obtains the coded data form the communicationdevice 22 via a network, not shown, or obtains the coded data stored inthe storage device 24 for decoding processing to extract data which candetect whether the document is falsified or not.

FIG. 2 is a diagram showing the functional structure of the encodingprogram 4 executed by the controller 20 to realize the encoding methodaccording to the present invention.

As shown in FIG. 2, the encoding program 4 includes a multivalued datareception part 40, a binary image generation part 42, a logic operationpart 44, and a code generation part 46. The binary image generation part42 includes a browsing image generation part 420 and a detecting imagegeneration part 422. The code generation part 46 includes a browsingimage encoding part 460 and a detecting image encoding part 462.

All or some of functions of the encoding program 4 may be realized byhardware such as ASIC provided on a printer 10.

The multivalued data reception part 40 of the encoding program 4 inputsmultivalued image data obtained via the communication device 22 or thestorage device 24. The multivalued data reception part 40 converts imagedata of the received inputted image to raster data (color componentimage) of each color component, performs screen processing to the rasterdata, and outputs the resulting data to the browsing image generationpart 420 and the detecting image generation part 422 of the binary imagegeneration part 42.

The binary image generation part 42 generates at least two binary imagesfrom the multivalued image inputted from the multivalued data receptionpart 40. More specifically, the binary image generation part 42generates from the multivalued image a browsing binary image and adetecting binary image for falsification detection. The binary imagegeneration part 42 generates two binary images from one multivaluedimage by applying different parameters.

The browsing image generation part 420 of the binary image generationpart 42 generates a browsing binary image from a multivalued image. Thebrowsing image generation part 420 varies a binarization threshold valueaccording to the density (gradation value) of a pixel value within apredetermined range of the multivalued image to perform binarizationprocessing to the multivalued image. The browsing image generation part420 performs binarization of each pixel value to black or whiteaccording to the varied threshold value to generate a browsing binaryimage. The browsing image generation part 420 varies the threshold valueup and down based on the pixel value of a pixel included in an imagearea of 5×5 pixels. The browsing image generation part 420 outputs thegenerated browsing binary image to the browsing image encoding part 460of the code generation part 46 and the logic operation part 44.

The detecting image generation part 422 generates a detecting binaryimage from a multivalued image. The detecting image generation part 422varies the binarization threshold value according to the density of apixel value within a range narrower than a predetermined range in thebrowsing image generation part 420 to perform binarization processing tothe multivalued image. The browsing image generation part 420 varies thethreshold value according to a pixel value within the narrower range. Athin line such as a wrinkle of an expression of a face is easily left inthe detecting binary image as compared with the browsing binary image toemphasize the shade of an object more. The detecting image generationpart 422 varies the threshold value up and down based on a pixel valueof a pixel included in an image area of 3×3 pixels. The detecting imagegeneration part 422 outputs the generated detecting binary image to thelogic operation part 44.

When the multivalued image has plural color component images formingcolor images, the browsing image generation part 420 and the detectingimage generation part 422 of the binary image generation part 42 performfloating binarization processing in the respective color componentimages.

The floating binarization processing of the binary image generation part42 will be described later.

The logic operation part 44 generates a check image based on a browsingbinary image generated by the browsing image generation part 420 and thedetecting binary image generated by the detecting image generation part422. More specifically, the logic operation part 44 performs logicoperation of the browsing binary image generated by the browsing imagegeneration part 420 and the detecting binary image generated by thedetecting image generation part 422 to generate a logic binary image sothat the logic binary image is a check image. When one of pixel valuesof a corresponding pixel in the browsing binary image and the detectingbinary image is black and the other pixel value is white, the pixelvalue of the pixel is black. When both pixel values are black or white,the pixel value of the pixel is white. The logic operation part 44generates a differential image of the browsing binary image and thedetecting binary image so that the generated differential image is acheck image. The logic operation part 44 outputs the check image to thedetecting image encoding part 462 of the code generation part 46.

The logic operation processing of the logic operation part 44 will bedescribed later.

The code generation part 46 encodes the browsing binary image generatedby the binary image generation part 42 and the binary check imagegenerated by the logic operation part 44 using different methods. Morespecifically, the code generation part 46 encodes the browsing binaryimage by applying text area encoding or generic area encoding specifiedby JBIG2 and encodes the binary check image by applying refinementencoding specified by JBIG2. The code generation part 46 generates codeddata from these encoded data pieces to output it to the communicationdevice 22 or to store it in the storage device 24.

The text area encoding and the refinement encoding will be describedlater.

The browsing image encoding part 460 of the code generation part 46encodes the browsing binary image by applying text area encoding orgeneric area encoding specified by JBIG2.

The detecting image encoding part 462 encodes the check image (logicbinary image) by applying the refinement encoding specified by JBIG2.

FIGS. 3A, 3B, 3C, and 3D are diagrams of assistance in explainingfloating binarization processing performed by the binary imagegeneration part 42, in which FIG. 3A illustrates the relation betweeninput pixel values and floating threshold values, FIG. 3B illustrates abrowsing binary image generated by the browsing image generation part420, FIG. 3C illustrates a detecting binary image generated by thedetecting image generation part 422, and FIG. 3D illustrates a checkimage generated by the logic operation part 44.

As illustrated in FIG. 3A, when a pixel value is inputted according tothe scan direction, a floating threshold value varies up and down by thebrowsing image generation part 420 or the detecting image generationpart 422. The browsing image generation part 420 varies the floatingthreshold value according to the pixel value of a pixel included in apredetermined range. The floating threshold value (in a wide range)varies up and down so as to follow the light and dark of the input pixelvalue.

The detecting image generation part 422 varies the floating thresholdvalue according to the pixel value of a pixel included in a rangenarrower than a predetermined range in the browsing image generationpart 420. The floating threshold value (in a narrow range) varies so asto follow the input pixel value faster than the floating threshold value(in a wide range). The varying width is larger than the varying width inthe browsing image generation part 420.

As illustrated in FIG. 3B, any slight light and dark portions of a pixelvalue and any thin line in the browsing binary image are removed so thatthe browsing binary image is a binary image for browsing.

As illustrated in FIG. 3C, any thin line is left in the detecting binaryimage and the slight light and dark of a pixel value are expressed byblack and white to be left. The detecting binary image is a binary imageincluding detailed information.

As illustrated in FIG. 3D, a check image is generated by the logicoperation part 44 in such a manner that the pixel values of a pixelwhich are different between the browsing binary image and the detectingbinary image are black and the pixel values of a pixel which are equaltherebetween are white.

The logic operation of the logic operation part 44 is not limited tooperation in this example and may be a logical product (AND) operation,a logical add (OR) operation, and an exclusive-OR (XOR) operation, or adifferential operation.

FIGS. 4A, 4B, and 4C are diagrams illustrating text area encodingperformed by the browsing image encoding part 460, in which FIG. 4Aillustrates a browsing binary image inputted to the browsing imageencoding part 460, FIG. 4B illustrates an image dictionary created bythe browsing image encoding part 460, and FIG. 4C illustrates data aftertext area encoding.

As illustrated in FIG. 4A, the browsing binary image has two values ofblack and white and any thin line is removed.

As illustrated in FIG. 4B, the browsing image encoding part 460registers a typical pattern included in the browsing binary image intothe image dictionary and gives indexes identifying these patterns to therespective patterns to complete the image dictionary.

As illustrated in FIG. 4C, the browsing image encoding part 460 comparesthe registered pattern with the pattern included in each color componentimage of the browsing binary image to generate data matching the indexwith the position for encoding.

The browsing image encoding part 460 may encode the browsing binaryimage illustrated in FIG. 4A by the generic area encoding specified byJBIG2. The generic area encoding is a method of encoding the browsingbinary image without creating the image dictionary. More specifically,the generic area encoding encodes an inputted image using statistics oflocal pixel array (for instance, context).

The refinement area specified by JBIG2 will be described.

The JBIG2 specifies two kinds of buffers placing an image as the decodedresult of an area. One of the buffers is a page buffer, which is abuffer as an output of a decoder. The other is an auxiliary buffer,which is a buffer placing intermediate data. All areas such as a textarea and a generic area can have an intermediate attribute. When thearea has the intermediate attribute, the decoded result is placed in theauxiliary buffer, not in the page buffer. The area placed in theauxiliary. buffer can be drawn in the page buffer by using thelater-described refinement area. At this time, the area of the auxiliarybuffer can be simply drawn in the page buffer and can be also drawn inthe page buffer after changing an image.

The detecting image encoding part 462 encodes the check image in thearea having the intermediate attribute to generate data which can bedecoded by using the refinement area.

FIG. 5 is a flowchart showing encoding processing (S10) of the encodingprogram 4.

As shown in FIG. 5, in step 100 (S100), when multivalued image data isinputted, the multivalued data reception part 40 converts themultivalued image data to raster data of each color component, performsscreen processing to the raster data, and outputs the resulting data tothe browsing image generation part 420 and the detecting imagegeneration part 422.

The browsing image generation part 420 varies the binarization thresholdvalue according to the density of a pixel value within a predeterminedrange of the multivalued image inputted from the multivalued datareception part 40, performs binarization processing to the multivaluedimage, and generates a browsing binary image. The browsing imagegeneration part 420 outputs the generated browsing binary image to thebrowsing image encoding part 460 and the logic operation part 44.

In step 102 (S102) , the detecting image generation part 422 varies thebinarization threshold value according to the density of a pixel valuewithin a range narrower than a predetermined range in the browsing imagegeneration part 420, performs binarization processing to the multivaluedimage inputted from the multivalued data reception part 40, andgenerates a detecting binary image. The detecting image generation part422 outputs the generated detecting binary image to the logic operationpart 44.

In step 104 (S104), the logic operation part 44 performs logic operationof the browsing binary image generated by the browsing image generationpart 420 and the detecting binary image generated by the detecting imagegeneration part 422 to generate a binary check image (logic binaryimage). The logic operation part 44 outputs the generated binary checkimage to the detecting image encoding part 462.

In step 106 (S106), the browsing image encoding part 460 encodes thebrowsing binary image by applying text area encoding or generic areaencoding.

In step 108 (S108), the detecting image encoding part 462 refinementencodes the binary check image.

In step 110 (S110), the code generation part 46 generates coded dataincluding respective data pieces encoded by the browsing image encodingpart 460 and the detecting image encoding part 462, and outputs it tothe communication device 22 or to store it in the storage device 24.

FIG. 6 is a diagram showing the functional structure of the decodingprogram 5 executed by the controller 20 to realize the decoding methodaccording to the present invention.

As shown in FIG. 6, the decoding program 5 includes a coded datareception part 50, a decoding part 52, and a synthesizing part 54. Thedecoding part 52 includes a browsing image decoding part 520 and adetecting image decoding part 522.

All or some of functions of the decoding program 5 may be realized byhardware such as ASIC provided on the printer 10.

The coded data reception part 50 in the decoding program 5 receives, viathe communication device 22 or the storage device 24, coded dataincluding plural image data pieces encoded by applying different methodsand outputs these image data pieces to the decoding part 52. Morespecifically, the coded data reception part 50 receives coded dataincluding the browsing binary image and the binary check image encodedby applying different methods, outputs the browsing binary image to thebrowsing image decoding part 520 of the decoding part 52, and outputsthe binary check image (logic binary image) to the detecting imagedecoding part 522. Here, the browsing binary image is an image encodedby text area encoding or generic area encoding specified by JBIG2. Thebinary check image is an image encoded by applying refinement encoding.

The decoding part 52 decodes the respective image data pieces inputtedfrom the coded data reception part 50 by different methods and outputsthe respective encoded data pieces to the synthesizing part 54. Morespecifically, the decoding part 52 decodes the browsing binary image byapplying text area decoding or generic area decoding, and decodes thebinary check image by applying refinement encoding.

The decoding part 52 may decode only the browsing binary image accordingto image browsing and falsification detection or may detect only thebinary check image.

The browsing image decoding part 520 of the decoding part 52 decodes thebrowsing binary image inputted from the coded data reception part 50 byapplying text area decoding or generic area decoding by control of thedecoding part 52, and outputs the browsing binary image to thesynthesizing part 54. The browsing image decoding part 520 may outputthe browsing binary image to the communication device 22 or may store itin the storage device 24.

The detecting image decoding part 522 decodes the binary check image byapplying refinement decoding by control of the decoding part 52 andoutputs the binary check image to the synthesizing part 54. Thedetecting image decoding part 522 may output the binary check image tothe communication device 22 or may store it in the storage device 24.

The refinement decoding will be described later.

The synthesizing part 54 synthesizes the browsing binary image (FIG. 3B)decoded by the browsing image decoding part 520 and the binary checkimage (FIG. 3D) decoded by the detecting image decoding part 522 togenerate the detecting binary image (FIG. 3C). More specifically, thesynthesizing part 54 performs an operation corresponding to theoperation performed by the logic operation part 44 of the encodingprogram 4 (FIG. 2) to generate the detecting binary image. When one ofpixel values of a corresponding pixel in the browsing binary image andthe check image is black and the other pixel value is white, the pixelvalue of the pixel is black. When both pixel values are black or white,the pixel value of the pixel is white. The synthesizing part 54generates the detecting binary image. The synthesizing part 54 outputsthe generated detecting binary image to the communication device 22 orstores it in the storage device 24.

The logic operation of the synthesizing part 54 may be an operationcorresponding to the logic operation part 44 of the encoding program 4,and without being limited to the operation in this example, maybe alogical product (AND) operation or a logical add (OR) operation.

FIGS. 7A, 7B, and 7C are diagrams of assistance in explaining refinementdecoding, in which FIG. 7A shows decoding of an area with anintermediate attribute, FIG. 7B shows the relation between an area of anauxiliary buffer and refinement decoding, and FIG. 7C shows the relationbetween a page buffer and refinement decoding.

As shown in FIG. 7A, when an area has an intermediate attribute, thedecoded result is placed in the auxiliary buffer, not in the pagebuffer. The area placed in the auxiliary buffer can be drawn in the pagebuffer using the refinement area. The area of the auxiliary buffer maybe directly drawn in the page buffer or may be drawn in the page bufferwhile changing the image.

As shown in FIG. 7B, when the refinement area is decoded to the area ofthe auxiliary buffer, the image placed in the auxiliary buffer is usedto be drawn in the page buffer.

As shown in FIG. 7C, when the refinement area is decoded to the pagebuffer, the image in the page buffer is used to be drawn in the pagebuffer.

The area of the auxiliary buffer may be used without changing the imageto be directly drawn in the page buffer.

In this case, the synthesizing part 54 synthesizes the browsing binaryimage and the binary check image by using the page buffer and theauxiliary buffer.

FIG. 8 is a flowchart showing decoding processing (S20) of the decodingprogram 5.

As shown in FIG. 8, in step 200 (S200), the coded data reception part 50receives coded data including an encoded browsing binary image andbinary check image, outputs the browsing binary image to the browsingimage decoding part 520, and outputs the binary check image to thedetecting image decoding part 522.

In step 202 (S202) , the browsing image decoding part 520 decodes thebrowsing binary image inputted from the coded data reception part 50 byapplying text area decoding or generic area decoding and outputs thebrowsing binary image to the synthesizing part 54. The browsing imagedecoding part 520 outputs the browsing binary image to the storagedevice 24.

In step 204 (S204), the detecting image decoding part 522 decodes thebinary check image (logic binary image) by applying refinement decodingand outputs the check image to the synthesizing part 54. The detecting.image decoding part 522 outputs the check image to the storage device24.

When browsing the image, the detecting image decoding part 522 may notoutput the decoded check image.

In step 206 (S206), the synthesizing part 54 synthesizes the browsingbinary image decoded by the browsing image decoding part 520 and thebinary check image decoded by the detecting image decoding part 522 togenerate a detecting binary image. The synthesizing part 54 outputs thegenerated detecting binary image to the storage device 24.

As described above, the encoding device 2 according to this embodimentgenerates at least two binary images from a multivalued image byapplying different methods, generates a check image based on the pluralgenerated binary images, and encodes at least one of the generatedbinary images and the check image generated by the check imagegeneration unit by using different methods. The encoding device 2 canencode a document with viewability of the document and falsificationdetection. In addition, the encoding device 2 generates a browsingbinary image and a detecting binary image from a multivalued image andperforms logic operation of these images to generate a binary checkimage. Document data which permits document browsing and falsificationdetection at high speed. Further, the encoding device 2 encodes thebrowsing binary image by applying text area encoding or generic areaencoding specified by JBIG2 and encodes the binary check image byapplying refinement encoding. The encoding processing can be performedefficiently at high speed.

The decoding device 3 according to this embodiment receives coded dataincluding plural image data pieces encoded by applying differentmethods, decodes the respective image data pieces included in the codeddata by different methods, and synthesizes the decoded results. Theprocessing speed at browsing and falsification detection can beincreased. In addition, the decoding device 3 decodes the browsingbinary image and the binary check image included in the received codeddata. A document with viewability can be decoded and data in whichfalsification detection is improved can be decoded. Further, thedecoding device 3 decodes the browsing binary image by applying textarea decoding or generic area decoding specified by JBIG2 and decodesthe binary check image by applying the refinement decoding. The decodingprocessing can be performed efficiently at high speed.

The encoding device 2 and the decoding device 3 according to a secondembodiment of the present invention will be described.

This embodiment is different from the first embodiment in that in theencoding processing, a detecting binary image is generated by allowing amultivalued image to be a binary halftone dot image.

FIG. 9 is a diagram of assistance in explaining detecting binary imagegenerating processing performed by the detecting image generation part422 of the encoding program 4 according to this embodiment.

As shown in FIG. 9, the detecting image generation part 422 generates abinary halftone dot image according to the density of a pixel valuewithin a predetermined range of a multivalued image inputted from themultivalued data reception part 40 so that the binary halftone dot imageis a detecting binary image.

More specifically, the detecting image generation part 422 generates adetecting binary image based on a binary halftone dot imagecorresponding to a density value (gradation value) within apredetermined range of a multivalued image. The size of the halftone dotcorresponds to the density value. In this manner, the detecting imagegeneration part 422 forms a binary halftone dot image which can expressgradation in a pseudo manner from a multivalued image so that the binaryhalftone dot image is a detecting binary image.

As described above, the encoding device 2 according to this embodimentgenerates a binary halftone dot image according to the density of apixel value within a predetermined range of a multivalued image so thatthe binary halftone dot image is a detecting binary image which can beefficiently encoded. In falsification detection, the decoding program 5outputs a binary halftone dot image. Whether a document is falsified ornot can be easily detected.

The encoding device 2 may embed time stamp information into at least oneof the generated browsing binary image and detecting binary image. Theencoding device 2 embeds time stamp information of creation date andtime or issuing data and time of a document as falsification detectiondata into the background of an image. The encoding device 2 embeds timestamp information into the background of an image by embedding an imagepattern not viewed by a human.

The decoding device 3 may compare a synthesized and generated detectingbinary image with a detecting binary image generated from image datapreviously stored as an original in the storage device 24 and detectwhether a document is falsified or not. In falsification detection, thedecoding device 3 may compare a decoded binary check image (logic binaryimage) with a binary check image generated from the previously storedimage data and detect document falsification. Further, the decodingdevice 3 may detect document falsification by using time stampinformation embedded into the browsing binary image and the detectingbinary image.

As described above, an encoding device according to the presentinvention includes a binary image generation unit that generates atleast two binary images from a multivalued image by applying differentmethods; a check image generation unit that generates a check imagebased on the plural binary images generated by the binary imagegeneration unit; and a code generation unit that generates coded data byencoding at least one of the binary images generated by the binary imagegeneration unit and the check image generated by the check imagegeneration unit by different methods.

The binary image generation unit may include a browsing image generationunit that generates a browsing binary image from a multivalued image,and a detecting image generation unit that generates a detecting binaryimage from a multivalued image.

The browsing image generation unit may vary a binarization thresholdvalue according to the density of a pixel value within a predeterminedrange of a multivalued image.

The detecting image generation unit may vary a binarization thresholdvalue according to the density of a pixel value within a range narrowerthan a predetermined range in the browsing image generation unit.

The detecting image generation unit may generate a binary halftone dotimage according to the density of a pixel value within a predeterminedrange of a multivalued image so that the binary halftone dot image isthe detecting binary image.

The check image generation unit may perform logic operation of thebrowsing binary image generated by the browsing image generation unitand the detecting binary image generated by the detecting imagegeneration unit to generate a binary check image.

The code generation unit may include a browsing image encoding unit thatencodes the browsing binary image generated by the browsing imagegeneration unit, and a detecting image encoding unit that encodes thecheck image generated by the check image generation unit.

The browsing image encoding unit may apply text area encoding or genericarea encoding specified by JBIG2.

The detecting image encoding unit may apply refinement encodingspecified by JBIG2.

A decoding device according to the present invention has a receptionunit that receives coded data including plural image data pieces encodedby applying different methods, an image decoding unit that decodesrespective image data pieces included in the coded data received by thereception unit by different methods, and a synthesizing unit thatsynthesizes the images decoded by the image decoding unit.

The reception unit may receive coded data including a browsing binaryimage and a binary check image encoded by applying different methods.

The image decoding unit may include a browsing image decoding unit thatdecodes the browsing binary image included in coded data received by thereception unit, and a detecting image decoding unit that decodes thebinary check image included in coded data received by the receptionunit.

The browsing image decoding unit may apply text area decoding or genericarea decoding specified by JBIG2.

The detecting image decoding unit may apply refinement area decodingspecified by JBIG2.

The synthesizing unit may synthesize the browsing binary image decodedby the browsing image decoding unit and the binary check image decodedby the detecting image decoding unit.

An encoding method according to the present invention generates at leasttwo binary images from a multivalued image by applying differentmethods, generates a check image based on the plural generated binaryimages, and generates coded data by encoding at least one of thegenerated binary images and the generated check image using differentmethods.

A decoding method according to the present invention receives coded dataincluding plural image data pieces encoded by applying differentmethods, decodes the respective image data pieces included in thereceived coded data by different methods, and synthesizes the decodedimages.

A storage medium readable by a computer, storing a first programaccording to the present invention, allows an encoding device includinga computer to execute generating at least two binary images from amultivalued image by applying different methods, generating a checkimage based on the plural generated binary images, and generating codeddata by encoding the generated binary image, at least one of thegenerated binary images and the generated check image by using differentmethods.

A storage medium readable by a computer, storing a second programaccording to the present invention, allows a decoding device including acomputer to execute receiving coded data including plural image datapieces encoded by applying different methods, decoding the respectiveimage data pieces included in the received coded data by differentmethods, and synthesizing the decoded images.

According to an encoding device and a decoding device of the presentinvention, a document can be effectively encoded and decoded to theextent that falsification can be detected.

The foregoing description of the embodiments of the present inventionhas been provided for the purposes of illustration and description. Itis not intended to be exhaustive or to limit the invention to theprecise forms disclosed. Obviously, many modifications and variationswill be apparent to practitioners skilled in the art. The embodimentswere chosen and described in order to best explain the principles of theinvention and its practical applications, thereby enabling othersskilled in the art to understand the invention for various embodimentsand with the various modifications as are suited to the particular usecontemplated. It is intended that the scope of the invention be definedby the following claims and their equivalents.

The entire disclosure of Japanese Patent Application No. 2005-172037filed on Jun. 13, 2005 including specification, claims, drawings andabstract is incorporated herein by reference in its entirety.

1. An encoding device comprising: a binary image generation unit thatgenerates at least two binary images from a multivalued image byapplying different methods; a check image generation unit that generatesa check image based on the plurality of binary images generated by thebinary image generation unit; and a code generation unit that generatescoded data by encoding at least one of the binary images generated bythe binary image generation unit and the check image generated by thecheck image generation unit by using different methods.
 2. The encodingdevice according to claim 1, wherein the binary image generation unitcomprises: a browsing image generation unit that generates a browsingbinary image from a multivalued image; and a detecting image generationunit that generates a detecting binary image from a multivalued image.3. The encoding device according to claim 2, wherein the browsing imagegeneration unit varies a binarization threshold value according to thedensity of a pixel value within a predetermined range of a multivaluedimage.
 4. The encoding device according to claim 3, wherein thedetecting image generation unit varies a binarization threshold valueaccording to the density of a pixel value within a range narrower than apredetermined range in the browsing image generation unit.
 5. Theencoding device according to claim 2, wherein the detecting imagegeneration unit generates a binary halftone dot image as the detectingbinary image according to the density of a pixel value within apredetermined range of a multivalued image.
 6. The encoding deviceaccording to claim 2, wherein the check image generation unit performslogic operation of the browsing binary image generated by the browsingimage generation unit and the detecting binary image generated by thedetecting image generation unit to generate a binary check image.
 7. Theencoding device according to claim 2, wherein the code generation unitcomprises: a browsing image encoding unit that encodes the browsingbinary image generated by the browsing image generation unit; and adetecting image encoding unit that encodes the check image generated bythe check image generation unit.
 8. The encoding device according toclaim 7, wherein the browsing image encoding unit applies text areaencoding or generic area encoding specified by JBIG2.
 9. The encodingdevice according to claim 7, wherein the detecting image encoding unitapplies refinement encoding specified by JBIG2.
 10. A decoding devicecomprising: a reception unit that receives coded data including aplurality of image data pieces encoded by applying different methods; animage decoding unit that decodes the respective image data piecesincluded in the coded data received by the reception unit by differentmethods; and a synthesizing unit that synthesizes the images decoded bythe image decoding unit.
 11. The decoding device according to claim 10,wherein the reception unit receives coded data including a browsingbinary image and a binary check image encoded by applying differentmethods.
 12. The decoding device according to claim 11, wherein theimage decoding unit comprises: a browsing image decoding unit thatdecodes the browsing binary image included in the coded data received bythe reception unit; and a detecting image decoding unit that decodes thebinary check image included in the coded data received by the receptionunit.
 13. The decoding device according to claim 12, wherein thebrowsing image decoding unit applies text area decoding or generic areadecoding specified by JBIG2.
 14. The decoding device according to claim13, wherein the detecting image decoding unit applies refinement areadecoding specified by JBIG2.
 15. The decoding device according to claim12, wherein the synthesizing unit synthesizes the browsing binary imagedecoded by the browsing image decoding unit and the binary check imagedecoded by the detecting image decoding unit.
 16. An encoding methodcomprising: generating at least two binary images from a multivaluedimage by applying different methods; generating a check image based onthe plurality of generated binary images; and generating coded data byencoding at least one of the generated binary images and the generatedcheck image by using different methods.
 17. A decoding methodcomprising: receiving coded data including a plurality of image datapieces encoded by applying different methods; decoding the respectiveimage data pieces included in the received coded data by differentmethods; and synthesizing the decoded images.
 18. A storage mediumreadable by a computer, the storage medium storing a program ofinstructions executable by the computer to perform a function forencoding, the function comprising: generating at least two binary imagesfrom a multivalued image by applying different methods; generating acheck image based on the plurality of generated binary images; andgenerating coded data by encoding the generated binary image, at leastone of the generated binary images and the generated check image byusing different methods.
 19. A storage medium readable by a computer,the storage medium storing a program of instructions executable by thecomputer to perform a function for decoding, the function comprising:receiving coded data including a plurality of image data pieces encodedby applying different methods; decoding the respective image data piecesincluded in the received coded data by different methods; andsynthesizing the decoded images.